<!DOCTYPE html>
<html lang="en">

<head>
    #include("./common/head.htm")
</head>

<body>
    #include("./common/header.htm")
    <div id="mainBody">
        <div class="container">
            <div class="row">
                <div class="span12" id="order-all">
                    <ul class="breadcrumb">
                        <li><a href="/view/catalog-main.html">首页</a> <span class="divider">/</span></li>
                        <li class="active">店铺</li>
                    </ul>
                    <h2>我的店铺</h2>
                    <div id="grids">
                        <ul class="nav nav-tabs" id="myTab">
                          <li class="active"><a href="#one" data-toggle="tab">店铺信息</a></li>
                          <li><a href="#two" data-toggle="tab">新增店铺</a></li>
                          <li><a href="#three" data-toggle="tab">数据中心</a></li>
                          <li><a href="#four" data-toggle="tab">订单处理</a></li>
                        </ul>
                    <div class="tab-content">
                    <div class="tab-pane active" id="one">
                    <div class="row-fluid">
                       <div class="span12">
                        <h4>您目前拥有的店铺如下：</h4>
                        <div class="span6">
                            <table class="table table-striped">
                            <thead>
                              <tr>
                                <th>序号</th>
                                <th>店铺名</th>
                                <th>地址</th>
                                <th>&nbsp;</th>
                              </tr>
                            </thead>
                            <tbody>
                              <tr v-for="mystore in mystores"  >
                                <td>{{ mystore.shopid }}</td>
                                <td>{{ mystore.name }}</td>
                                <td>{{ mystore.address }}</td>
                                <td><a href="javascript:void(0)" class="btn btn-primary" @click="sendToDetail(mystore.shopid)" >店铺管理</a></td>
                              </tr>
                            </tbody>
                          </table>
                        </div>
                        </div>
                    </div>
                    </div>
                    <div class="tab-pane" id="two">
                    <div class="row-fluid">
                        <div class="span12" >
                            <h4>请填写店铺的信息</h4>
                            <section id="form">
                            <div class="row-fluid">
                            <div class="span6">
                                <form class="form-horizontal">
                                    <fieldset>
                                      <div class="control-group">
                                        <label class="control-label" for="input01">店铺名</label>
                                        <div class="controls">
                                          <input type="text" class="input-xlarge" id="input01" v-model="store.name">
                                          <span></span>
                                        </div>
                                      </div>
                                       <div class="control-group">
                                        <label class="control-label" for="input11">店铺地址</label>
                                        <div class="controls">
                                          <input type="text" class="input-xlarge" id="input11" v-model="store.address">
                                         
                                        </div>
                                      </div>
                                      <div class="control-group">
                                        <label class="control-label" for="input01">店铺所有者</label>
                                        <div class="controls">
                                          <input type="text" class="input-xlarge" id="input01" v-model="store.sellername">
                                          <span></span>
                                        </div>
                                      </div>
                                       <!-- <div class="control-group">
                                        <label class="control-label" for="textarea">店铺简介</label>
                                        <div class="controls">
                                          <textarea class="input-xlarge" id="textarea" rows="3" style="height:65px" v-model="store.description"></textarea>
                                        </div>
                                      </div> -->
                                      <div class="form-actions">
                                        <button type="submit" class="btn btn-primary" @click.prevent="addNewStore()" >提交</button>
                                        <button class="btn" @click.prevent="reset()" >重置</button>
                                      </div>
                                    </fieldset>
                                  </form>
                                </div>
                                </div>
                            </section>
                            </div>
                    </div>
                    </div>
                    <div class="tab-pane" id="three">
                        <div class="row-fluid">
                            <div class="span12" >
                                <h4 align="center">销售数据一览</h4>
                                <hr/>
                                <div id="charts00" style="width: 600px;height:400px;">
                                </div>
                                <h4 align="center">好评率一览</h4>
                                <hr/>
                                <div :id="'charts'+index" style="width: 1300px;height:800px;" v-for="(store,index) in mystores" ></div>
                                <hr/>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane" id="four">
                      <div class="row-fluid">
                         <div class="span12">
                          <h4></h4>
                          <div>
                            <table class="table table-striped table-bordered table-condensed">
                                <tr>
                                    <th>订单编号</th>
                                    <th>店铺名</th>
                                    <th>收货地址</th>
                                    <th>下单时间</th>
                                    <th>收货时间</th>
                                    <th>状态</th>
                                    <th>查看详情</th>
                                    <th>业务</th>
                                </tr>
                                <tr v-for="order in orderList">
                                    <td>{{order.orderid}}</td>
                                    <td>{{order.shopname}}</td>
                                    <td>{{order.receivingaddr}}</td>
                                    <td>{{order.ordertime}}</td>
                                    <td>{{order.recevingtime}}</td>
                                    <td>
                                        <span v-if="order.status === 0" class="label label-impotant label-large">待付款</span>
                                        <span v-else-if="order.status === 1" class="label label-info">未发货</span>
                                        <span v-else-if="order.status === 2" class="label label-primary">已发货</span>
                                        <span v-else-if="order.status === 3" class="label label-success">确认收货</span>
                                        <span v-else-if="order.status === 4" class="label label-warning">退货中</span>
                                        <span v-else-if="order.status === 5" class="label label-default">退货成功</span>
                                        <span v-else-if="order.status === 6" class="label label-default">拒绝退货</span>
                                    </td>
                                    <td>
                                        <button class="btn btn-mini">
                                          <a href="#order-detail" @click="showDetail(order.orderid)">详情</a>
                                        </button>
                                    </td>
                                    <td>
                                        <button class="btn btn-mini" v-if="order.status === 1"><a href="#" @click="deliver(order.orderid)">发货</a></button>
                                        <button class="btn btn-mini" v-else-if="order.status === 4">
                                          <a href="#return-form" role="button" data-toggle="modal" style="padding-right: 0;" @click="recordId(order.orderid)">处理退货</a>
                                        </button>
                                    </td>
                                </tr>
                            </table>
                          </div>
                          </div>
                    </div>
                    <div id="return-form" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="login"
                    aria-hidden="false">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h3>退货处理</h3>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal loginFrm">
                            <p>买家退货理由：{{ refundReason }}<p>
                            <div class="control-group" >
                                <ul>
                                    <li><label><input type="radio" name="return" v-model="isconfirm" value="1" checked="checked">确认退货</label></li>
                                    <li><label><input type="radio" name="return" v-model="isconfirm" value="0">拒绝退货</label></li>
                                </ul>
                            </div>
                            <div class="control-group" v-if="isconfirm==0" >
                              <input type="text" id="reason" placeholder="您的拒绝理由" v-model="refusalReason">
                          </div>
                        </form>
                        <button type="submit" class="btn btn-success" @click="updateReturn(isconfirm)">提交</button>
                        <button class="btn" data-dismiss="modal" aria-hidden="true">返回</button>
                    </div>
                    </div>
                    </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- MainBody End ============================= -->
    #include("./common/footer.htm")
</body>

</html>